package com.lcxw.hxzbapi.controller.shortvideocontroller;

import com.lcxw.hxzbapi.entity.requestBean.AddSVCommentReq;
import com.lcxw.hxzbapi.entity.requestBean.DeleteSvCommentReq;
import com.lcxw.hxzbapi.entity.requestBean.GetAllSvCommentReq;
import com.lcxw.hxzbapi.entity.requestBean.LikeSvComment;
import com.lcxw.hxzbapi.entity.response.Response;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/shortVideo/comment")
@Slf4j
public class ShortVideoCommentController {

    @Resource
    ShortVideoRealization shortVideoRealization;

    @PostMapping("/add")
    public Response addSvComment(@RequestBody AddSVCommentReq addSVCommentReq) {
        return shortVideoRealization.addSvComment(addSVCommentReq);
    }

    @PostMapping("/get")
    public Response getAllSvComment(@RequestBody GetAllSvCommentReq getAllSvCommentReq) {
        return shortVideoRealization.getAllSvComment(getAllSvCommentReq);
    }

    @PostMapping("/delete")
    public Response deleteSvComment(@RequestBody DeleteSvCommentReq deleteSvCommentReq) {
        return shortVideoRealization.deleteSvComment(deleteSvCommentReq);
    }

    //评论点赞接口
    @PostMapping("/like")
    public Response likeSvComment(@RequestBody LikeSvComment likeSvComment) {
        return shortVideoRealization.likeSvComment(likeSvComment);
    }

    //取消评论点赞接口
    @PostMapping("/unlike")
    public Response unlikeSvComment(@RequestBody LikeSvComment likeSvComment) {
        return shortVideoRealization.unlikeSvComment(likeSvComment);
    }


}
